<?php
defined('BASEPATH') or exit('No direct script access allowed');

if (! function_exists('permission')) {

    function permission($code)
    {
        $CI = &get_instance();
        $permissionCode = $CI->session->permissionCode;
        return in_array($code, $permissionCode);
    }
}